package com.aoxin.mapper.attend;

import com.aoxin.model.SlfUserCourseCondition;
import com.aoxin.model.attend.ClassRecord;
import com.aoxin.model.attend.QueryRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClassRecordMapper {
    /**
     * 查询最近的一堂预约课B
     * @param childrenId
     * @return
     */
    List<SlfUserCourseCondition> getOrderCourseBC(@Param("childrenId")Integer childrenId,@Param("flag")int flag);
    /**
     * 判断是否已经打过卡
     * @param syllabusId
     * @return
     */
    Integer checkRecord(@Param("syllabusId")Long syllabusId,@Param("courseType")Integer courseType);

    /**
     * 插入一条预约记录
     * @param classRecord
     * @return
     */
    Integer addRecord(ClassRecord classRecord);

    /**
     * 修改打卡状态B
     * @param id
     * @return
     */
    Integer updateCardStatusB(Long id);
    /**
     * 修改打卡状态
     * @param id
     * @return
     */
    Integer updateCardStatusC(Long id);

    /**
     * 用户考勤记录轨迹
     * @return
     */
    Integer addUserRecord(ClassRecord classRecord);

    /**
     * 考勤记录查询
     * @param queryRecord
     * @return
     */
    List<QueryRecord> getRecord(QueryRecord queryRecord);
}
